﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Models.View
{
    public class IndexModel
    {
        [Key]
        public int Id { get; set; }
        public string Url { get; set; }
        [Column(TypeName = "text")]
        public string Text { get; set; }
        /// <summary>
        /// 类型true：文本类，false：图片类
        /// </summary>
        [Column(TypeName = "bit")]
        [Required]
        public bool ThisType { get; set; }
        /// <summary>
        /// 位置,css选择器的标签
        /// </summary>
        [Column(TypeName = "varchar(100)")]
        [Required]
        public string Position { get; set; }
        /// <summary>
        /// 顺序
        /// </summary>
        [Required]
        public int Sort { get; set; }
        /// <summary>
        /// 描述自己的样式
        /// </summary>
        [Column(TypeName = "varchar(100)")]
        public string Style { get; set; }
    }
}